<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:r="http://richfaces.org/rich" xmlns:a="http://richfaces.org/a4j"
	xmlns:ad="http://agiledev.com.br/fieldset"
	template="/layout/template.xhtml">

	<ui:define name="body">

		<h:form id="fTeamS">
			<s:decorate template="/layout/comands.xhtml">
				<a:commandButton value="#{messages.pesquisar}" actionListener="#{teamSearchMB.pesquisar}" reRender="dtTeam"/>
			</s:decorate>
		
			<ad:fieldset legenda="#{messages.argumentos}">
				
				<s:decorate	template="/layout/edit.xhtml">
					<ui:define name="label">
						<h:outputText value="#{messages.nome}" />
					</ui:define>
					<h:inputText id="nome" value="#{teamSearchMB.team.nome}" size="50" maxlength="50">
						<f:validateLength maximum="50" />
					</h:inputText>
				</s:decorate> 
				
			</ad:fieldset>

			<ad:fieldset legenda="#{messages.teams}">
				
				<r:dataTable id="dtTeam" value="#{teamSearchMB.resultados}" var="item" rows="20" width="100%">

					<r:column>
						<f:facet name="header">
							<h:outputText value="#{messages.codigo}" />
						</f:facet>
	
						<h:outputText value="#{item.oid}" />
					</r:column>

	
					<r:column>
						<f:facet name="header">
							<h:outputText value="#{messages.nome}" />
						</f:facet>
	
						<s:link view="/pages/team/team.xhtml" value="#{item.nome}">
							<f:param name="oid" value="#{item.oid}"/>
						</s:link>
					</r:column>

					<r:column>
						<f:facet name="header">
							<h:outputText value="#{messages.descricao}" />
						</f:facet>
	
						<h:outputText value="#{item.descricao}"/>
					</r:column>
					
				</r:dataTable> 
			
			</ad:fieldset>

		</h:form>
	</ui:define>

</ui:composition>